|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ReceiveImpl.java | - | 86.4% | 82.4% | 84.6% |
|
1 |
/*
|
|
2 |
* $Id: ReceiveImpl.java,v 1.1 2004/12/15 14:18:13 patforna Exp $
|
|
3 |
*
|
|
4 |
* Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
|
|
5 |
* Berne University of Applied Sciences
|
|
6 |
* School of Engineering and Information Technology
|
|
7 |
* All rights reserved.
|
|
8 |
*/
|
|
9 |
package bexee.model.activity.impl;
|
|
10 |
|
|
11 |
import javax.xml.namespace.QName;
|
|
12 |
|
|
13 |
import bexee.core.ProcessController;
|
|
14 |
import bexee.core.ProcessInstance;
|
|
15 |
import bexee.model.BPELElementVisitor;
|
|
16 |
import bexee.model.StandardAttributes;
|
|
17 |
import bexee.model.activity.Receive;
|
|
18 |
import bexee.model.elements.Correlations;
|
|
19 |
import bexee.model.elements.PartnerLink;
|
|
20 |
import bexee.model.elements.Variable;
|
|
21 |
|
|
22 |
/**
|
|
23 |
* Default implementation of the <code>Receive</code> activity.
|
|
24 |
*
|
|
25 |
* @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:13 $
|
|
26 |
* @author Patric Fornasier
|
|
27 |
* @author Pawel Kowalski
|
|
28 |
*/
|
|
29 |
public class ReceiveImpl extends AbstractActivity implements Receive { |
|
30 |
|
|
31 |
private PartnerLink partnerLink;
|
|
32 |
|
|
33 |
private String partnerLinkName;
|
|
34 |
|
|
35 |
private QName portType;
|
|
36 |
|
|
37 |
private String operation;
|
|
38 |
|
|
39 |
private Variable variable;
|
|
40 |
|
|
41 |
private boolean createInstance = false; |
|
42 |
|
|
43 |
private Correlations correlations;
|
|
44 |
|
|
45 |
//**************************************************/
|
|
46 |
// c'tors
|
|
47 |
//**************************************************/
|
|
48 |
|
|
49 | 12 |
public ReceiveImpl() {
|
50 | 12 |
this(null); |
51 |
} |
|
52 |
|
|
53 |
/**
|
|
54 |
* @param standardAttributes
|
|
55 |
*/
|
|
56 | 12 |
public ReceiveImpl(StandardAttributes standardAttributes) {
|
57 | 12 |
this(standardAttributes, null, null, null, null, null); |
58 |
} |
|
59 |
|
|
60 |
/**
|
|
61 |
* @param standardAttributes
|
|
62 |
* @param link
|
|
63 |
* @param portTypeQName
|
|
64 |
* @param operation2
|
|
65 |
* @param variable2
|
|
66 |
* @param createInstance2
|
|
67 |
*/
|
|
68 | 50 |
public ReceiveImpl(StandardAttributes standardAttributes,
|
69 |
PartnerLink partnerLink, QName portType, String operation, |
|
70 |
Variable variable, String createInstance) { |
|
71 |
|
|
72 | 50 |
super(standardAttributes);
|
73 |
|
|
74 | 50 |
this.partnerLink = partnerLink;
|
75 | 50 |
this.portType = portType;
|
76 | 50 |
this.operation = operation;
|
77 | 50 |
this.variable = variable;
|
78 |
|
|
79 | 50 |
this.createInstance = getValidValueOrDefault(createInstance,
|
80 |
DEFAULT_CREATE_ACTIVITY); |
|
81 |
} |
|
82 |
|
|
83 |
//**************************************************/
|
|
84 |
// bexee.model.activity.Receive
|
|
85 |
//**************************************************/
|
|
86 |
|
|
87 | 8 |
public void setPartnerLink(PartnerLink partnerLink) { |
88 | 8 |
this.partnerLink = partnerLink;
|
89 |
} |
|
90 |
|
|
91 | 8 |
public PartnerLink getPartnerLink() {
|
92 | 8 |
return partnerLink;
|
93 |
} |
|
94 |
|
|
95 | 0 |
public void setPortType(QName portType) { |
96 | 0 |
this.portType = portType;
|
97 |
} |
|
98 |
|
|
99 | 2 |
public QName getPortType() {
|
100 | 2 |
return portType;
|
101 |
} |
|
102 |
|
|
103 | 8 |
public void setOperation(String operation) { |
104 | 8 |
this.operation = operation;
|
105 |
} |
|
106 |
|
|
107 | 6 |
public String getOperation() {
|
108 | 6 |
return operation;
|
109 |
} |
|
110 |
|
|
111 | 8 |
public void setVariable(Variable variable) { |
112 | 8 |
this.variable = variable;
|
113 |
} |
|
114 |
|
|
115 | 12 |
public Variable getVariable() {
|
116 | 12 |
return variable;
|
117 |
} |
|
118 |
|
|
119 | 4 |
public void setCreateInstance(boolean createInstance) { |
120 | 4 |
this.createInstance = createInstance;
|
121 |
} |
|
122 |
|
|
123 | 14 |
public boolean isCreateInstance() { |
124 | 14 |
return createInstance;
|
125 |
} |
|
126 |
|
|
127 | 0 |
public void setCorrelations(Correlations correlations) { |
128 | 0 |
this.correlations = correlations;
|
129 |
} |
|
130 |
|
|
131 | 0 |
public Correlations getCorrelations() {
|
132 | 0 |
return correlations;
|
133 |
} |
|
134 |
|
|
135 |
//**************************************************/
|
|
136 |
// bexee.core.BPELElement
|
|
137 |
//**************************************************/
|
|
138 |
|
|
139 | 10 |
public void accept(ProcessController controller, ProcessInstance instance) |
140 |
throws Exception {
|
|
141 | 10 |
controller.process(this, instance);
|
142 |
} |
|
143 |
|
|
144 | 44 |
public void accept(BPELElementVisitor elementVisitor) { |
145 | 44 |
elementVisitor.visit(this);
|
146 |
} |
|
147 |
} |
|